function submitPaper(){
    /*数据封装*/
    var fd = new FormData(document.getElementById("paper"));
    fd.append("author", document.getElementById("usernameonly").innerHTML);
    //创建xhr，使用ajax进行文件上传
    var xhr = new XMLHttpRequest();
    xhr.open("post","/upload");
    //回调
    xhr.onreadystatechange = function () {
        if (xhr.readyState==4 && xhr.status==200){
            if(JSON.parse(xhr.responseText).code){
                alert("Upload Successfully!");
                location.reload();
            }else{
                alert("Upload Failed!");
            }
        }
    }
    //获取上传的进度
    xhr.upload.onprogress = function (event) {
        if(event.lengthComputable){
            var percent = event.loaded/event.total *100;
            document.querySelector("#progress .progress_item").style.width = percent+"%";
        }
    }
    //将formdata上传
    xhr.send(fd);
}